/*
 * @Author: AskMeWhy
 * @Date: 2020-12-22 14:58:20
 * @Last Modified by: AskMeWhy
 * @Last Modified time: 2021-02-04 10:59:10
 */

$base-container-transition-duration: 300ms;
$base-container-transition-timing-function: linear;

.base-layout-main{
    width: 100%;
    height: 100%;
    position: relative;
    @include flexLayout(flex,normal,normal);
    flex-flow: column;
}
.base-layout-aside{
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100%;
    width: 2.2rem;
    z-index: 4;
    padding: 0;
    transition-property: width;
    transition-duration: $base-container-transition-duration;
    transition-timing-function: $base-container-transition-timing-function;
    background: #37383A;
    .aside-title-bg {
        height: 50px;
        background: linear-gradient(90deg, #C53535 0%, rgba(127, 62, 62, 0.39) 100%);
        opacity: 0.2;
    }
    .aside-title {
        height: 50px;
        padding: 0 18px 0 10px;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        @include flexLayout(flex,justify,center);
        .blh__bar-user-logo {
            img {
                display: block;
                width: 42px;
                height: 40px;
            }
        }
        .aside-btn-box {
            @include flexLayout(flex,center,center);
        }
        .aside-btn {
            cursor: pointer;
            color: #F7F7F7;
            font-size: 14px;
            &.aside-btn_unfold {
                transform: rotate(180deg);
            }
        }
    }
    .base-layout-main.has-aside.in-collapse &{
        width: .84rem;
        .aside-title {
            padding: 0 10px;
        }
        .el-menu--collapse {
            width: .84rem;
        }
        .el-submenu__title {
            padding: 0 40px 0 20px;
        }
        .ct-icon-box {
            margin-right: .34rem;
        }
    }
}
.base-layout-main .base-layout-header{
    z-index: 8;
    flex: 0 0 auto;
}
.base-layout-body {
    width: 100%;
    height: calc(100% - .65rem);
    padding: 0;
    background: $page--body-bg;
    position: relative;
    flex: 1;
    transition-property: padding;
    transition-duration: $base-container-transition-duration;
    transition-timing-function: $base-container-transition-timing-function;
    .base-layout-main.has-aside &{
        padding-left: 2.2rem;
    }
    .base-layout-main.has-aside.in-collapse &{
        padding-left: .84rem;
    }
}
.base-page-wrapper{
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    padding: 0 .1rem .1rem .1rem;
    // border-radius: .04rem;
    background-color: $page--bg;
    // box-shadow: 0 2px 4px 1px rgba(40, 120, 255, 0.08), 0 0 6px 1px rgba(0, 0, 0, 0.08);
}

/* 进入过渡的状态 */
.base-layout-toggle-transition-enter-active {
    position: relative;
    z-index: 4;
    width: 100%;
    animation: base-layout-toggle-animation-enter $base-container-transition-duration
        $base-container-transition-timing-function;
}
@keyframes base-layout-toggle-animation-enter {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}
/* 离开过渡的状态 */
.base-layout-toggle-transition-leave-active {
    position: absolute;
    top: 0;
    width: 100%;
    padding: 0 0 .2rem .04rem;
    left: 0;
    opacity: 1;
    z-index: 1;
    animation: base-layout-toggle-animation-leave $base-container-transition-duration
        $base-container-transition-timing-function;
}
@keyframes base-layout-toggle-animation-leave {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0;
    }
}
